package com.htfyun.factorytest.engineer_test;

import android.content.Context;

import androidx.fragment.app.Fragment;

import com.htfyun.factorytest.RootApplication;

import com.htfyun.factorytest.R;

/**
 * Created by sst on 2018/7/11.
 */

public enum EngineerFragmentItemsEnum {

//    es7210_32_16(R.string.engineer_test_es7210_32bit_and_16bit,  FragmentES7210_32And16Bit.class),
    assist(R.string.engineer_test_assist,  FragmentAssistSettings.class),
    es7210(R.string.engineer_test_es7210,  FragmentES7210.class),
//    es7210(R.string.engineer_test_es7210,  FragmentES7210_MonoTest.class),
    record_normal(R.string.record_normal,  FragmentNormalRecord.class),
    xfm10213(R.string.engineer_test_xfm10213,  FragmentXFM10213.class),

    ;
    private final int nameResId;
    private final Class<? extends Fragment> fragmentClass;

    EngineerFragmentItemsEnum(int nameResId, Class<? extends Fragment> cls) {
        this.nameResId = nameResId;
        this.fragmentClass = cls;
    }

    public String getName() {
        final Context context = RootApplication.getContext();
        if (nameResId > 0) {
            return context.getString(nameResId);
        }
        return "";
    }

    public Class<? extends Fragment> getFragmentClass() {
        return fragmentClass;
    }


}
